<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, ininial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="../static/lib/Semantic-UI/dist/semantic.min.css"
          th:href="@{/lib/Semantic-UI/dist/semantic.min.css}">
    <link rel="stylesheet" type="text/css" href="../static/css/me.css" th:href="@{/css/me.css}">
    <title>归档</title>
</head>
<body>
<!--导航-->
<nav class="ui inverted segment m-padded-td-mini m-shadow-small" th:replace="_fragments :: menu(4)">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu ">

            <h2 class="ui lightblue header item"><img src="../static/images/1.jpg" th:src="@{/images/1.jpg}" alt=""
                                                      class="ui avatar image m-img-place">ToutuBlog
            </h2>
            <a href="#" class="m-item item m-mobile-hide"><i class="home icon"></i>首页</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="tags icon"></i>标签</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
            <a href="#" class="active m-item item m-mobile-hide"><i class="archive icon"></i>归档</a>
            <!--搜索栏-->
            <div class="right m-item item m-mobile-hide">
                <div class="ui inverted transparent icon input">
                    <input type="text" placeholder="搜索">
                    <i class="search link icon"></i>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-top-right m-computer-hide ">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--中间-->
<div class="m-padded-td-large  m-container">
    <div class="ui container">
        <div class="ui top padded attached segment">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <h3 class="ui lightblue header">博客</h3>
                </div>
                <div class="right aligned column">
                    共 <h2 class="ui orange header m-inline-block" th:text="${blogCount}">2</h2>篇博客
                </div>
            </div>
        </div>

        <th:block th:each="item : ${archiveMap}">
            <h3 class="ui center aligned header" th:text="${item.key}">2021</h3>
            <div class="ui fluid vertical menu ">
                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item " th:each="blog : ${item.value}">
                    <span>
                        <i class="ui smallblue mini circle icon"></i><span th:text="${blog.title}">标题</span>
                        <div class="ui teal basic label" th:text="${#dates.format(blog.updateTime,'MMMdd')}">6月9日</div>
                    </span>
                    <div class="ui orange basic left pointing label m-padded-mini " th:text="${blog.flag}">原创</div>
                </a>
                <!--/*-->
                <a href="#" target="_blank" class="item">
                    <span>
                        <i class="ui smallblue mini circle icon"></i>&nbsp;&nbsp;&nbsp;标题2&nbsp;&nbsp;
                        <div class="ui teal basic label">6月9日</div>
                    </span>
                    <div class="ui teal basic label large">转载</div>
                </a>
                <!--*/-->
            </div>
        </th:block>


    </div>
</div>
<!--底部-->
<footer th:replace="_fragments :: footer" class="ui inverted vertical segment m-padded-td-foot">
    <div class="ui container center aligned">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column center aligned">
                <h4 class="ui inverted header">最新博客</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item" th:each="blog : ${newblogs}" th:text="${blog.title}">推荐</a>
                    </div>
                </div>
            </div>

            <div class="ten wide column">
                <img src="../static/images/mmexport1623033757364.jpg" th:src="@{/images/mmexport1623033757364.jpg}"
                     class="ui rounded images" alt=""
                     style="width: 100px">
                <div style="float:right;">
                    <h4 class="ui inverted header center aligned">关于我</h4>
                    <p class="m-opacity-mini ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一个将要秃头的准程序员做的第一个项目，这是我第一次接触前端，全是照着教程敲出</p>
                    <p class="m-opacity-mini ">来的。主要看的是后端，前端随便做了一个。</p>
                </div>
            </div>

            <div class="three wide column center aligned">
                <h4 class="ui inverted header center aligned">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">Email:&ensp;1294863577@qq.com</a>
                    <br>
                    <a href="#" class="item">Wechat:&ensp;ww17695456199</a>
                </div>
            </div>

        </div>
        <div class="ui inverted section divider "></div>
        <p class="m-opacity-mini">备案号备案号备案号备案号备案号备案号备案号备案号备案号</p>


    </div>
</footer>

<script
        src="https://code.jquery.com/jquery-3.1.1.min.js"
        integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
        crossorigin="anonymous"></script>
<script src="../static/lib/Semantic-UI/dist/semantic.min.js" th:src="@{/lib/Semantic-UI/dist/semantic.min.js}"></script>
<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide')
    });

    $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");
</script>
</body>
</html>